package com.joymart.common.system;

import jakarta.annotation.PostConstruct;
import org.springframework.stereotype.Component;
import xyz.downgoon.snowflake.Snowflake;

@Component
public class IdGenerator {

    private Snowflake snowflake;

    @PostConstruct
    public void init(){
        this.snowflake = new Snowflake(01,01);
    }

    public String next(){
        return String.valueOf(snowflake.nextId());
    }

}
